package editorsvg.geometria;

/**
 * Reperesenta una dimensión ancho-alto implementada con numeros reales de precision doble.
 * La razón de implementar esta clase es que no la hay (de momento) en las librerias Java.
 *
 * @author Jorge Berjano
 */
public interface MiDimension2D {

    public class Double extends java.awt.geom.Dimension2D {

        private double width;
        private double height;

        public Double() {
        }

        @Override
        public String toString() {
            return getClass().getName() + "[width=" + width + ",height=" + height + "]";
        }

        public Double(double width, double height) {
            this.setWidth(width);
            this.setHeight(height);
        }

        public void setWidth(double width) {
            this.width = width;
        }

        public double getWidth() {
            return width;
        }

        public void setHeight(double height) {
            this.height = height;
        }

        public double getHeight() {
            return height;
        }

        public void setSize(double width, double height) {
            this.setWidth(width);
            this.setHeight(height);
        }
    }
}
